<template>
  <div>
    <el-dialog title="dialog" :visible.sync="dialogVisible">
      balabala
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'dlg',
  props: {
    showDlg: {
      type: Boolean,
      default: false
    }
  },
  computed: {
    dialogVisible: {
      get () {
        return !!this.showDlg
      },
      set (val) {
        console.log('val', val)
        this.$emit('update:showDlg', val)
      }
    }
  },
  data () {
    return {
    }
  },
  methods: {}
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
